package com.fhzz.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;

import com.fhzz.model.Role;
import com.fhzz.model.Role_permission;
import com.fhzz.model.User_role;

@Mapper
public interface RoleMapper {
	
	public List<Role> getRoles();
	
	public void addUserRole(User_role ur);
	
	public Role getRoleIdbyName(String rolename);
	
	public List<Role> getRoleInfo();
	
	public void addRole(Role role);
	
	public void addRolePermission(Role_permission rp);
	
	public void deleteRole(int rid);
	
	public void deleteRolePermission(int roleid);
	
	public void deleteUserRole(int roleid);
	
	/**
	 * 根据id获取角色信息
	 * @param rid
	 * @return
	 */
	public Role getRoleById(int rid);
}
